#include<iostream>
#include<string>
#include<vector>
using namespace std;

int main()
{
	string str = "helloworld!";
	str.insert(5, " ");
	cout << str << endl;
	str.erase(5, 2);
	cout << str << endl;
	str.erase(1);
	cout << str << endl;
	
	vector<int> arr(10, 0);
	//arr.reserve(20);
	for (auto& e : arr)
	{
		cout << e << " ";
	}
	cout << endl;
	arr.push_back(200);
	arr.push_back(300);
	arr.push_back(400);
	arr.push_back(500);
	arr.push_back(600);
	arr.push_back(700);
	//arr.insert(0,100);
	//arr.erase(1);
	auto it = arr.begin();
	it = arr.insert(it, 50);
	for (auto& e : arr)
	{
		cout << e << " ";
	}
	cout << endl;
	it = arr.insert(it, 5,20);
	for (auto& e : arr)
	{
		cout << e << " ";
	}
	cout << endl;
	it = arr.erase(it,it+6);
	for (auto& e : arr)
	{
		cout << e << " ";
	}
	return 0;
}
